home *** CD-ROM | disk | FTP | other *** search
/ Informática Multimedia 1995 April / Informatica Multimedia CD - Epimundo.iso / DOS / CAT_DISK / DCAT / DCAT03.DOC next >
Encoding:
Text File  |  1988-03-26  |  34.6 KB  |  751 lines

  1.  
  2.                                  DCAT03.DOC
  3.  
  4.                                 March 8, 1988
  5.  
  6.                                by John Deakin
  7.                      Compuserve User ID (PPN) 74015,1624
  8.                               Genie ID JDeakin
  9.  
  10.                                     Index
  11.  
  12.      A.   Release to Public Domain
  13.  
  14.      B.   Warning
  15.  
  16.      C.   Quick Start
  17.  
  18.      D.   Introduction
  19.  
  20.      E.   Command Line Options
  21.  
  22.           1.   Disk to be cataloged
  23.  
  24.           2.   Disk, path & file name for master catalog
  25.  
  26.           3.   Letter Options
  27.  
  28.                U    Upper or lower case catalog listing
  29.  
  30.                X    Create cross-reference listing when done
  31.  
  32.                F    Force new label on each disk
  33.  
  34.      F.   Usage suggestions
  35.  
  36.      G.   Credits
  37.  
  38.      H.   Future upgrades
  39.  
  40.      I.   Modification history
  41.  
  42.  
  43. A.   Release to Public Domain
  44. =============================
  45. DCATxx.EXE and DCATxx.DOC are released to the public domain, without
  46. restrictions of any kind.  The source code is not available.
  47.  
  48.  
  49. B.   Warning
  50. ============
  51.                                   WARNING!
  52.  
  53. This program is capable of magnetically writing information on disks.  I have
  54. tested it as carefully as I know how, and so have others, with no ill
  55. effects.  However, as with any such program, please take a few basic
  56. precautions.  Create a few floppy disks for test purposes, and back up your
  57. hard disk.  Run CHKDSK and any other diagnostic programs you may have BEFORE
  58. you run DCAT, then again AFTER running DCAT and exercising its features,
  59. especially the re-label feature.  Please don't let this warning "turn you
  60. off" on DCAT, I believe it should be common practice with ANY new program,
  61. commercial, shareware, or otherwise.
  62.  
  63. It runs on my system with no problems that I can see, and has been tested
  64. under DOS 2.0.  However, it may have other effects on other machines I don't
  65. know about yet.  Once a few dozen people report using it without any problems
  66. (if that many ever run it), I'll be a lot more comfortable.
  67.  
  68. I run a Toshiba T3100/20, which is an IBM-AT compatible machine, with DOS
  69. 3.2, Vcache, Sidekick, and about a dozen other TSR's.
  70.  
  71.  
  72. C.   Quick Start
  73. ================
  74.                                   Warning!
  75.  
  76.           (If you have been using DCAT02 or earlier beta test
  77.           versions, you should (once more) erase and re-create
  78.           your entire master catalog.  Sorry.)
  79.  
  80. Preferred usage is to place DCAT on your hard disk (usually C:), anywhere in
  81. your normal path, RENamed as you like (I use DC.EXE).  Call up the program in
  82. the usual way, and you will be presented with some information, along with
  83. the prompt to insert a disk in drive A:.  Just hit the <space> bar, and
  84. repeat for a few disks, then exit with <Esc>.
  85.  
  86. Then, look in your root directory using any lister (Vern Buerg's LIST62A
  87. highly recommended (shareware, $15)), and you will find a two new files,
  88. named DCAT.CAT and DCAT.BAK.  As you might suppose, DCAT.BAK will always
  89. contain the "previous version".  DCAT.CAT will first list each disk label and
  90. space available, one per line.  DCAT.CAT will then list each file found and
  91. disk label where found, one per line.
  92.  
  93. Subsequent runs will update the catalog as you might expect.
  94.  
  95.  
  96. D.   Introduction
  97. =================
  98. DCATxx (xx is the version number) is intended primarily as a program to
  99. catalog floppy disks, so that any given file may be found as quickly as
  100. possible from a bunch of floppies.  It will also assist in "housekeeping" on
  101. such floppies, allowing the user to determine how many copies of a file
  102. exist, and where they are located.  It is fast, simple, and convenient,
  103. without many of the "bells and whistles" of other MS-DOS programs.  It will
  104. scan all sub-directories on the cataloged disk.  It will maintain the master
  105. catalog in pure ASCII (upper or lower case) text, allowing the use of other
  106. programs and tricks with that catalog.
  107.  
  108. The master catalog is maintained in one file, with two parts.  The first part
  109. is a list of disks, with free space remaining, each on one line.  The second
  110. part is a list of filenames, time/date, filesize, disk volume label, and sub-
  111. directory found, each file on one line, with its data.
  112.  
  113.      Example:
  114.  
  115. VolumeLabel      Space
  116. deakin020       491520 free
  117. main           6463488 free
  118. |- End disk listing -|
  119.  
  120. Filename.Ext mm/dd/yy hh:mm:ss  Size   VolumeLabel Path\Path\...
  121. |----------| |------| |------||------| |---------| |--------------->
  122. abort.txt    02/05/88 18:08:28   15232 main        \tap
  123. addendum     01/01/88 12:00:00    3265 main        \pr
  124. datetest.c   11/01/87 23:17:36     959 main        \turboc\source
  125. dc.bak       03/05/88 13:24:14   18380 main        \turboc
  126. dc.c         03/05/88 01:01:42   18181 deakin020   \
  127. dc.c         03/05/88 13:37:44   16458 main        \
  128. dc.c         03/04/88 15:26:12   17493 deakin020   \subdir1
  129. dc.c         03/04/88 15:26:12   17493 deakin020   \subdir1\subdir1a
  130. dc.c         03/05/88 13:37:44   16458 main        \turboc
  131. dc.c         03/05/88 01:01:42   18181 main        \turboc\source
  132. dc.exe       03/04/88 16:12:10   18974 deakin020   \
  133. dc.exe       03/04/88 16:12:10   18974 deakin020   \subdir1
  134. dc.exe       03/04/88 16:12:10   18974 deakin020   \subdir1\subdir1a
  135. dc.exe       03/05/88 13:37:58   19174 main        \turboc
  136. dc.obj       03/04/88 16:12:08   10951 deakin020   \
  137. dc.obj       03/04/88 16:12:08   10951 deakin020   \subdir1
  138. dc.obj       03/04/88 16:12:08   10951 deakin020   \subdir1\subdir1a
  139. dc.obj       03/05/88 13:37:56   11215 main        \turboc
  140. dcat.arc     12/23/87 22:47:22   30027 main        \turboc\source
  141. dcat.asm     09/26/87 23:34:04    3200 main        \optasm
  142. dcat.bak     03/05/88 01:56:42    6230 main        \
  143. z80asm.com   07/01/87 23:05:48   22528 main        \z80cpm
  144. z80mu.exe    12/08/85 17:00:00   96518 main        \z80cpm
  145. zaptap.inf   01/01/88 01:01:00    5632 main        \tap
  146.  
  147.  
  148. Note the file is maintained in FILENAME.EXT order first,
  149.                                SUB-DIRECTORY order second, and
  150.                                VOLUME LABEL order third.
  151.  
  152. This may appear a bit odd at first, as you might think it should appear in
  153. the displayed order, left to right.  However, if I put the sub-dir information
  154. in the second column where you might expect it, that column would either have
  155. to be 80 characters wide to accommodate the longest possible path name, OR the
  156. columns would be "ragged", which would be most undesirable.
  157.  
  158. When DCAT loads, it determines the amount of memory available to it, and
  159. determines (and tells you) how many files per disk it can handle.  My system
  160. has about 430,000 bytes of RAM free after all my TSR's are loaded, and this
  161. allows just over 8,000 files per disk (absolute maximum is 32,000).  The size
  162. of the master catalog is limited only by disk space.
  163.  
  164.  
  165. E.   Command Line Options
  166. =========================
  167. For those wishing to use DCAT in a different way, there are several command
  168. line options.  If you elect to use these, I suggest you either set up a BAT
  169. (Batch) file to do it the same way, every time, or even better, a CED (or
  170. PCED) SYNonym.  (CED is public domain, PCED is a commercial product, both by
  171. Chris Dunford, Cove Software Group.)
  172.  
  173. If you do use options, and try to remember them, you will almost certainly
  174. end up with different catalog files scattered all over the place, possibly
  175. with information from an unintended disk.  There is no way to "merge" such
  176. files.
  177.  
  178. Command line options may be entered in any order, or omitted.  They must be
  179. separated by one or more spaces.  DCAT scans the command line, checking the
  180. syntax of each "group of characters" for proper matches.  A quick example of
  181. a full-blown command line:
  182.  
  183.           C: > dcat a: -c:\misc\catalog ufx
  184.                ^^^^ ^^ ^^^^^^^^^^^^^^^^ ^^^
  185.                |||| || |||||||||||||||| |||
  186.                |||| || |||||||||||||||| +++-- Letter options
  187.                |||| || |||||||||+++++++------ Catalog name
  188.                |||| || ||||++++-------------- Sub-dir name
  189.                |||| || +++------------------- Drive specification
  190.                |||| ++----------------------- Catalog this disk
  191.                ++++-------------------------- Program name
  192.  
  193. The following command line would produce exactly the same result:
  194.  
  195.           C: > dcat xfu -c:\misc\catalog a:
  196.  
  197.      1.   Disk to be cataloged
  198.      =========================
  199.      This command line parameter tells DCAT where to find the disk to be
  200.      added to the catalog, and must consist of a letter, A through F (upper
  201.      or lower case), followed immediately by a colon, in the usual MS-DOS
  202.      manner.  Valid examples:
  203.  
  204.                C:> DCAT A:      <-- normal usage
  205.                C:> DCAT C:      <-- can do this, from root only
  206.                C:> dcat f:      <-- lower case ok, too
  207.  
  208.      2.   Disk, path & file name for master catalog
  209.      ==============================================
  210.  
  211.           (Note:  Previous versions required the "backslash" to
  212.           identify the disk and sub-directory where the catalog
  213.           file is to be placed.  This has been changed to the
  214.           leading "-" (minus).
  215.  
  216.      This command line parameter tells DCAT where to place the master
  217.      catalog.  The user can specify a disk drive, a path, and a filename.  It
  218.      must have a leading "minus" (-) in order for DCAT to recognize the
  219.      command.  That leading minus will NOT be used as part of the filename.
  220.      Valid examples:
  221.  
  222.           C:> dcat -\catalog
  223.  
  224.           This would force the filename to be CATALOG.CAT(the
  225.           ".cat" extent is added automatically), into the root
  226.           directory of the C: drive.
  227.  
  228.           C:> dcat -catalog
  229.  
  230.           Careful!  This means put it in the "current sub-
  231.           directory", from wherever you happen to call DCAT.
  232.  
  233.           C:> dcat -d:\subdir1\subdir2\catalog
  234.  
  235.           This would put CATALOG.CAT on drive D:, with the path
  236.  
  237.                          \subdir1\subdir2
  238.  
  239.      3.   Letter Options
  240.      ===================
  241.      If DCAT finds a command line group that does NOT match the syntax for
  242.      the first two described above, it assumes you are specifying one of the
  243.      command line option letters U, F, or X, described here.  Superfluous
  244.      letters are simply ignored.
  245.  
  246.           Valid examples:
  247.  
  248.                C:> dcat u        <-- all upper case,
  249.                C:> dcat uf       <-- and ask for new labels,
  250.                C:> dcat ufx      <-- and make a cross-reference file.
  251.  
  252.           (U) Upper or lower case catalog listing
  253.  
  254.           DCAT defaults to keep the master catalog in all lower case.  If you
  255.           prefer, you may use this option to force all upper case.  If you
  256.           decide you want "the other case", just re-catalog one floppy with
  257.           or without the U option letter, and the entire catalog will be re-
  258.           written.  The ORDER is always as if all alpha characters are
  259.           actually in upper case, regardless of the case chosen for the
  260.           catalog.  This is necessary to handle filenames or labels with odd,
  261.           non-alpha characters.
  262.  
  263.           (X) Create cross-reference listing when done
  264.  
  265.           Disabled function, at this writing.
  266.  
  267.           (F) Force new label query on each disk
  268.  
  269.           This option tells DCAT to stop on every single disk and ask for a
  270.           new volume label, even if there is already one on the disk.  A
  271.           simple <cr> will tell DCAT the existing label should be kept.  This
  272.           is of benefit to the initial setup of your master catalog, and
  273.           later when adding a group of new disks.  Note that if there is no
  274.           volume label at all on the disk, DCAT will automatically prompt for
  275.           a label, regardless of how it was called, and will not continue
  276.           until a valid label is entered and written to the disk.  Note this
  277.           may create a problem if you have a factory master you wish to
  278.           catalog, with no volume label, and write-protected.  It will be
  279.           necessary to "un-protect" it long enough to write a volume label,
  280.           either with DCAT, or some other program.  A better procedure is to
  281.           make a copy of that master, add a volume label, and catalog that.
  282.  
  283.  
  284. F.   Usage suggestions
  285. ======================
  286. In some ways, DCAT will allow you to do things in a much less organized
  287. manner, while keeping you better organized.  However, to do this, it is
  288. necessary to do a little organization first!
  289.  
  290. Let us consider the manner in which most folks organize their floppies
  291. without a cataloging program.  Most seem to gravitate towards sticking a
  292. paper label on the disk jacket, with a general title or comment as to what
  293. type of programs are on that disk.  If you program in BASIC, you might have
  294. one labeled "Working BASIC programs", another "BASIC data files", etc.  I
  295. find this terribly wasteful of disk space, as one seldom-used disk might go
  296. for months with only a few files, while you might have to have three or four
  297. (or more) "Word-Processing Data Files" disks, some full, some not, perhaps
  298. with some loose grouping.  Labels are difficult or impossible to peel off,
  299. and end up a mess, eventually having little relationship to the contents of
  300. the disk.
  301.  
  302. Think about the way MS-DOS handles files.  You certainly don't care if a text
  303. file gets put on a track right next to a program, you let DOS take care of
  304. all those details.  Why not treat your collection of floppies in a similar
  305. manner?  Whether you have 20, or 200, why not treat the whole bunch as just
  306. one big "blob" of data, and let an easier system take care of the dirty
  307. details?  I realize this will be a radical idea to many, and can hear the
  308. howls now "but I've ALWAYS kept my <whatever> files on a separate disk!"
  309. DCAT can help you there, too, but I think there's a better way.
  310.  
  311. For any effective use of DCAT, you will need to develop and use a reasonably
  312. systematic method of labeling disks, with the magnetic volume label also
  313. clearly displayed on the disk jacket.  A simple system of four digit numbers,
  314. like "0001", "0002", etc. will do nicely, and means you'll NEVER have to re-
  315. label disks again.
  316.  
  317.                                   Warning!
  318.  
  319.           DON'T write MAGNETIC volume labels as "1,2,....9,10,11,12",
  320.           however!  That would sort as:
  321.  
  322.           1
  323.           11
  324.           12
  325.           2
  326.           3
  327.  
  328. which most folks would consider undesirable.  There's nothing wrong with
  329. putting "1" on the PAPER label of disk "0001", of course.
  330.  
  331. However, DCAT permits any volume label, so it's up to you.  There MUST be
  332. some way to relate the volume label to the physical disk.  It doesn't do you
  333. much good to have a volume label of PA2342SLT, and have the Toshiba factory
  334. paper label say only "Master System Disk".  With that, you've got to remember
  335. what it means, and that's a bummer.
  336.  
  337. I suggest you fool around with DCAT a little bit, see how it works, then give
  338. some thought to a systematic way of labeling your disks in some manner that
  339. provides a direct mental connection between the paper label and the magnetic
  340. volume label written into the disk directory.  This is a crucial, absolute
  341. requirement!
  342.  
  343. DCAT may be copied to any drive, any subdirectory, and renamed as needed.  I
  344. run it from my \ms subdir, where all my system files and utilities are
  345. located, and I call it DC.EXE.
  346.  
  347. Note there is a command line option for (F)orce, and also a (F)orce option
  348. while actually running DCAT.  If you use the command line option, DCAT will
  349. automatically stop and ask for a new label on each disk.  If you are in the
  350. midst of a cataloging operation, did not specify the "F" option, and realize
  351. you wish to re-label just one disk, you may hit "F" instead of <space>, and
  352. DCAT will prompt you for a new label for just that disk.
  353.  
  354. (Of minor interest is that ANY key will make DCAT "go", not just the space
  355. bar and the "F" key.)
  356.  
  357. Unlike previous programs under CP/M, DCAT does not require the creation of a
  358. zero-length file with special characters.  Instead, it uses the capability
  359. under MS-DOS to have a "volume label" written magnetically on the disk.  Any
  360. legal characters for a volume label may be used, and no special characters
  361. are required.
  362.  
  363.                 WARNING:  A volume label is ALWAYS required.
  364.  
  365. Volume labels should be unique, or all files on multiple disks will be listed
  366. under the same volume label, sort of defeating the purpose of DCAT.
  367.  
  368. The first time DCAT is run, it will create its own datafile, as needed.  You
  369. can, if you wish, have several catalog data files, in different sub-
  370. directories, or with different names, although that's likely to get confusing,
  371. if overdone.  The master catalog and the backup file are closed and updated
  372. after every single disk.  During operation, the catalog data file is read,
  373. left unchanged and a scratch file is created.  Only upon successful close of
  374. that file does the previous data file get written to <filename>.BAK, and the
  375. scratch file RENamed to <filename>.CAT.  As a result, you will normally have
  376. the current catalog, and its predecessor when DCAT is done, normally named
  377. DCAT.CAT and DCAT.BAK.  Even a power failure at the most critical moment will
  378. leave a good catalog, either in <catfile>.CAT or <catfile>.BAK.
  379.  
  380. These are pure ASCII text files, and can be looked at with any editor.  Be
  381. VERY careful about editing, as the program expects to find certain things
  382. like spacing, format, separator lines, etc.  Any MANUAL edit that alters
  383. order, spacing, or virtually anything about the file will corrupt it, and
  384. subsequent catalog operations by DCAT will only increase the errors.  Once
  385. corrupted, the file cannot be recovered.  I STRONGLY suggest you ONLY delete
  386. whole lines if you edit the file, and DO NOT delete or alter the lines like:
  387.  
  388.  
  389. VolumeLabel      Space
  390. |- End disk listing -|
  391.                                            <- not even this blank line!
  392. Filename.Ext mm/dd/yy hh:mm:ss  Size   VolumeLabel Path\Path\...
  393. |----------| |------| |------||------| |---------| |--------------->
  394.  
  395.  
  396. It is much safer use a "lister" program that cannot alter the file, and let
  397. DCAT itself do all the alterations.  DCAT was designed to be used with Vern
  398. Buerg's superb LIST62a program, available as shareware ($15).  That program
  399. will allow you to scan the list, look for specific text, and find whatever you
  400. need, using the (F)ind and (A)gain commands.  There are others that will do
  401. the job, but I know of none so nice.  It is one of the most heavily used
  402. programs on my own system.
  403.  
  404. Note the columnar layout of the catalog file.  If you wish, it is suitable
  405. for a variety of purposes.  It can be sorted in many different ways, for
  406. example, by disk volume label.  To do this, COPY the catalog file (normally
  407. DCAT.CAT) to a file with another name, use any editor to "clip" the first
  408. section out, then sort on column 40 (with left-most column being 1).  With
  409. similar modest effort, the catalog file might be loaded into a dBASE DBF
  410. file, or some other data-base program's data format.
  411.  
  412. On my system, I also have a SYNonym called "cat" which looks like:
  413.  
  414.              ced syn cat "list \dcat.cat"
  415.  
  416. With this, from any DOS prompt, anywhere in the system, I can just type
  417. "cat<cr>", and look at my master catalog of disks.  The same effect can be
  418. had with a BAT file, of course.  You'd create a text file called CAT.BAT in
  419. your normal path, with the following line:
  420.  
  421.              list \dcat.cat
  422.  
  423. There is currently no easy way totally to delete an entire disk from the
  424. master catalog.  In my opinion, this will rarely be required, because even
  425. though you delete all files from a disk, you still want the disk listed in the
  426. catalog file, showing it as having maximum "Space Free".  If you must totally
  427. delete it, the easiest way to do so is to erase all files from the disk you
  428. wish to delete, run DCAT on it to remove all the files from the catalog, then
  429. simply edit the catalog file to remove the one line that contains the volume
  430. label and free space remaining.  Alternatively, a macro editor could be used
  431. to search out all occurrences of the volume label and delete any line on which
  432. it is found, but that could also delete a filename containing the same
  433. characters, if you're not careful.
  434.  
  435. If you want to delete a volume from the catalog, and you do not wish to
  436. delete all files from the disk in order to run DCAT on it, you can also
  437. temporarily label a blank disk with the same name, and run DCAT on that.
  438.  
  439. Ok, let's assume you have DCATxx.ARC, DCAT.EXE, and DCAT.DOC in your current
  440. directory as you read this, and you have temporarily labeled a few disks with
  441. masking tape, and "0001", "0002", etc., and cataloged them, just for fun.  You
  442. think you'd like to archive just DCATxx.ARC, and wonder which disk has enough
  443. space.  Check the size of DCATxx.ARC, then look at the catalog's first
  444. section, scan down until you find a disk with "just enough" space, grab that
  445. disk by number (absolutely uncaring what else might be on it), copy DCATxx.ARC
  446. to it, call up DCAT, hit <space> <esc>, and you're DONE.  The file is archived
  447. and cataloged in less time than it took you to read this paragraph!
  448.  
  449. (A side benefit is that using DCAT in the suggested manner will lead to much
  450. more effecient usage of your floppy disks, with most of them having only a
  451. little space remaining, then a few with increasing space, followed by all the
  452. rest with maximum space free.)
  453.  
  454. Having done that, you delete the ARC file from your hard disk, but find you'd
  455. like to pass DCAT along to a friend, in the original ARC file.  You call up
  456. your catalog with LIST62A, use the <F>ind command on "dc", then <A>gain until
  457. you come to DCATxx.ARC.  Looking on that line, you see it is on disk 0018, and
  458. in what subdirectory (if you use them on floppies, I don't).  Grab the disk
  459. with "0018" (or "18") on the jacket, and you've got it, right now.
  460.  
  461. Now let's say you're one of my long-suffering beta testers, and you've got
  462. "dc*.*" files all over the place, just like I do.  Call up LIST DCAT.CAT
  463. again, <F>ind "dc", and take a look.  Fish out all the floppies with
  464. "dc<anything>" on them, DEL DC*.*, and you KNOW you're starting "clean".  (Of
  465. course, you then have the option of DELeting all these LATEST files,
  466. forgetting you ever heard of DCAT, and REALLY "starting clean"!)
  467.  
  468. DCAT scans the floppy very quickly, and the moment that scan is done, you are
  469. free to remove that floppy and insert the next one, even if DCAT is still
  470. writing the new or updated information to the catalog file.  A bell and prompt
  471. tells you exactly when you can do this, and with a little practice, you'll be
  472. able to catalog floppy disks just as fast as you can stuff 'em in the drive.
  473.  
  474. (Of course, DON'T try this during the really strange case of writing the
  475. catalog datafile on the same floppy being cataloged!).
  476.  
  477. G.   Credits
  478. ============
  479. DCAT is 100% original coding in Turbo C from scratch, by me, except for a few
  480. lines by Dennis Vallianos in the disk volume re-labeling function.
  481.  
  482. However, I would be less than honest if I did not give credit to the people
  483. and programs which led up to it.
  484.  
  485. According to Ward Christensen, "sometime in the late 1970's", he wrote a CP/M
  486. program he called FMAP that would, among other things, produce a sorted
  487. directory to a disk file.  From this was born the idea of a "master" catalog
  488. program.  Since CP/M had no provision for volume labels, Ward also had the
  489. idea of creating a zero-length file under CP/M, with the initial character
  490. "-", so that it would sort to the top of the list.  FMAP created the list,
  491. UCAT updated it, and CAT was for searching the list.  Ward remembers writing,
  492. but probably did not release a program he called KAT, which could do a much
  493. faster binary search on initial characters.
  494.  
  495. According to much later documentation in an MS-DOS variant (NCAT), in early
  496. 1980, Lewis Moseley, Jr. wrote a program combining these functions, and
  497. called it NEWCAT.
  498.  
  499. Irv Hoff remembers "some fellow in a trailer camp near Georgia" working on
  500. this program, and that he thinks it was called NCAT at the time.  That may,
  501. or may not have been Moseley.
  502.  
  503. Irv then took the program, cleaned it up, made it more automatic, made it
  504. capable of handling any number of sorted filenames, and renamed it MCAT,
  505. eventually ending up with MCAT45, which remains, in my opinion, the classic
  506. disk catalog program for CP/M-80.
  507.  
  508. In about 1982, Dennis Vallianos translated NEWCAT into 8088 assembler
  509. language, and called that NCAT.  The one problem with that program was that
  510. it did not create a list of disks, with free space remaining on each, a
  511. critical need, in my opinion.
  512.  
  513. On April 7, 1984, Peter A. Polansky, of Dolgeville NY, took the source code
  514. from Irv's MCAT, and translated it to CP/M-86, calling it MCAT86-1.  It did
  515. not produce a list of disks and free space either.
  516.  
  517. I was quite distressed at the huge size, clumsiness, and "rampant featuritis"
  518. I found in the other disk catalog programs in the DOS world, so decided to
  519. "roll my own", with only the options I wanted.  I have named it DCAT, for
  520. "Disk CATaloger".  I started in assembler, but about that time, Borland came
  521. out with the superb Turbo C compiler, so I decided to use that, learning a
  522. little about C in the process.  (Wow, did I ever!)
  523.  
  524. My deepest thanks:
  525.  
  526. To Ward Christensen 76703,302, who started it all.
  527.  
  528. To Irv Hoff 76701,117, whose efforts in CP/M public domain programming are a
  529. legend, and an inspiration to us all.  DCAT is patterned very closely after
  530. MCAT45, although I have never seen the source code for that program.
  531.  
  532. To Dennis Vallianos 70406,1163 for his assistance these many years, on a
  533. variety of computer-related matters, for his encouragement, for his pushing
  534. me to try Turbo C, and for specific advice and comments on DCAT.  I have
  535. cursed him (under my breath) as much as I have praised him publicly, but I've
  536. learned a good deal as a result of his efforts, and in spite of my own
  537. limitations.
  538.  
  539. To Bill Snyder 70425,115 and Phil Tobias 74055,530 for encouragement,
  540. testing, suggestions and assistance.
  541.  
  542. To Mike Rubenstien and Pete Becker on Borland's BPROGB for several very
  543. helpful messages getting me over a number of humps in learning a little about
  544. Turbo C.
  545.  
  546. H.   Future Upgrades
  547. ====================
  548. You'll note the (X) "Cross-reference" command is disabled.  I have not yet
  549. decided exactly how to present the information, user input is requested for
  550. "the next version", please.  I know how to do it, I just can't think of any
  551. satisfactory method of displaying the information.  About the best I can think
  552. of at the moment is:
  553.  
  554. dc.c         03/05/88 01:01:42   18181 deakin020   \
  555.              03/05/88 13:37:44   16458 main        \
  556.              03/04/88 15:26:12   17493 deakin020   \subdir1
  557.              03/04/88 15:26:12   17493 deakin020   \subdir1\subdir1a
  558.              03/05/88 13:37:44   16458 main        \turboc
  559.              03/05/88 01:01:42   18181 main        \turboc\source
  560. dc.exe       03/04/88 16:12:10   18974 deakin020   \
  561.              03/04/88 16:12:10   18974 deakin020   \subdir1
  562.              03/04/88 16:12:10   18974 deakin020   \subdir1\subdir1a
  563.              03/05/88 13:37:58   19174 main        \turboc
  564.              03/04/88 16:12:08   10951 deakin020   \
  565. dc.obj       03/04/88 16:12:08   10951 deakin020   \subdir1
  566.              03/04/88 16:12:08   10951 deakin020   \subdir1\subdir1a
  567.              03/05/88 13:37:56   11215 main        \turboc
  568.  
  569.  
  570. I am considering further command line options to make DCAT do a sort on other
  571. fields, producing a separate file of results.  User input requested.  Again, I
  572. know how to program it, I just don't need any other formats myself, and have
  573. no idea what you might have in mind.
  574.  
  575.  
  576. I.   Modification history
  577. =========================
  578.  
  579.  
  580. March 8, 1988 DCAT03  John Deakin
  581. =================================
  582. Added a blank line to separate the two portion of the catalog file.
  583.  
  584. Total re-write and cleanup of the source code, many functions re-done.
  585.  
  586. Added progress reporting to say "Rev: " on files with the same name, same
  587. sub-dir and same volume, but with a different time/date.  Previous versions
  588. said "Del: ", then "Add: ", which was a bit disconcerting.
  589.  
  590. Totally re-wrote sort and merge routines.
  591.  
  592. Converted from Tiny memory model to Compact.
  593.  
  594. Finally!  Added full date, time, size and sub-directory information to
  595. catalog file.
  596.  
  597. Minor cleanup of opening screen, on catalog file display.
  598.  
  599. Added progress reporting during catalog operation, will delete this in future
  600. versions, as I gain confidence that it is not bombing any systems.
  601.  
  602. Fixed problem where if DCAT was invoked from a subdirectory, and told to
  603. catalog the same disk from which invoked, it would start in the current sub-
  604. directory and work "down" only.  It will now ALWAYS catalog from the root
  605. directory of ANY drive, and will end up back on the drive, and in the sub-
  606. directory from which invoked.  (Unless interrupted with ^C, in which case it
  607. will end up logged onto whatever drive, and in whatever sub-dir was being
  608. cataloged when halted.)
  609.  
  610. Changed command line syntax, to use the more familiar "minus" sign to
  611. identify the disk/drive/path of the catalog file, instead of the visually
  612. confusing backslash or worse, the double backslash.  Should have been this
  613. way from the start.
  614.  
  615. Changed memory allocations and compiler options so that uninitialized
  616. pointers do not take up space in the EXE file.  Added code to determine
  617. maximum number of disk files per disk.
  618.  
  619. Cleaned up the logic in the merge_label area, reducing file size a little.
  620.  
  621. Changed all internal operation to work with all upper case at all times.  If
  622. U option is NOT selected, conversion to lower case is done only just before
  623. output to the screen or to the catalog file.  This results in exactly the
  624. same file order regardless of case, and also allows changing case of the
  625. entire catalog file.
  626.  
  627. Fixed bug introduced in DCAT02, if no label on disk, a <cr> is entered at the
  628. label prompt, then <esc> was hit, disk was cataloged under a blank label.
  629.  
  630.  
  631. February 10, 1988 DCAT02  John Deakin
  632. =====================================
  633. Fixed bug causing master catalog corruption if any of the five characters ( [
  634. ] ^ \ _ ) between the upper and lower case ASCII set are used in filenames or
  635. disk labels.
  636.  
  637. Increase maximum files per cataloged disk to 10000 from 1000, which was used
  638. during development and forgotten.
  639.  
  640. Added error trapping to detect more than 10000 files per disk.
  641.  
  642. Complete re-write of this DOC file.
  643.  
  644.  
  645. February 4, 1988  DCAT01  First full release.  John Deakin
  646. ==========================================================
  647. Calling this one DCAT01, removing all restrictions, releasing to public
  648. domain.
  649.  
  650. Added subdirectory traversal, will now catalog every file, in every
  651. subdirectory, using recursion.  When a file is in two or more subdirectories
  652. on the same disk, it will show up as two entries in the master catalog, and
  653. in the cross-reference.
  654.  
  655. Fixed bug that added trailing spaces to master catalog entries.
  656.  
  657. Completely re-did logic (again) for merging directory entries with catalog
  658. entries.
  659.  
  660.  
  661. January 1, 1988 (approximate date)  Fifth release.  John Deakin
  662. ===============================================================
  663. Cleaned up disk volume re-labeling routines, with assistance from Dennis
  664. Vallianos.  No more deleting, so DOS 2.0 block removed.
  665.  
  666. Cleaned up command line parsing, parameters can now be entered in any order,
  667. with minimum key strokes.
  668.  
  669. Cleaned up logic of merging labels, merging files.
  670.  
  671. Converted to listing free space fully (730112 vs. 713k).
  672.  
  673.  
  674. December 24, 1987   Fourth release, beta test version.  John Deakin
  675. ===================================================================
  676. Attempted to fix bug causing crash on some systems with a label on the
  677. catalog disk a full 11 characters long.  Unable to duplicate the error on my
  678. own system, but did find a possible cause.
  679.  
  680.  
  681. December 23, 1987   Third release, beta test version.   John Deakin
  682. ===================================================================
  683. Fixed bug that caused all cataloging to actually be done on A drive, even
  684. though another drive specified on command line.
  685.  
  686.  
  687. December 21, 1987   Second release, beta test version.  John Deakin
  688. ===================================================================
  689. Fixed bug causing duplicate files in catalog, caused by a filename with one
  690. character.
  691.  
  692. Fixed volume label routines to accept labels with spaces.
  693.  
  694. General code cleanup, improved prompting, improved user interface.
  695.  
  696. Added (F)orce capability to re-label a disk with a label already on it.
  697.  
  698. Added several command line options:
  699.  
  700. o    Added capability to specify disk drive to catalog (A thru F), with
  701.      default remaining A: drive.
  702.  
  703. o    Added capability to specify data file name, as well as the disk and
  704.      directory to put it on/in.  Default remains C:\DCAT.CAT.
  705.  
  706. o    (F)orce re-labeling ALL disks.
  707.  
  708. o    Make data files (U)pper case (default is lower case)
  709.  
  710. o    Create an additional (X) cross-reference listing.
  711.  
  712.  
  713. December 13, 1987   First release, alpha test version.  John Deakin
  714. ===================================================================
  715.  
  716.                               End of DCAT03.DOC
  717.          ----------------end-of-author's-documentation---------------
  718.  
  719.                         Software Library Information:
  720.  
  721.                    This disk copy provided as a service of
  722.  
  723.                         The Public (Software) Library
  724.  
  725.          We are not the authors of this program, nor are we associated
  726.          with the author in any way other than as a distributor of the
  727.          program in accordance with the author's terms of distribution.
  728.  
  729.          Please direct shareware payments and specific questions about
  730.          this program to the author of the program, whose name appears
  731.          elsewhere in  this documentation. If you have trouble getting
  732.          in touch with the author,  we will do whatever we can to help
  733.          you with your questions. All programs have been tested and do
  734.          run.  To report problems,  please use the form that is in the
  735.          file PROBLEM.DOC on many of our disks or in other written for-
  736.          mat with screen printouts, if possible.  The P(s)L cannot de-
  737.          bug programs over the telephone.
  738.  
  739.          Disks in the P(s)L are updated monthly, so if you did not get
  740.          this disk  directly from the P(s)L,  you should be aware that
  741.          the files in this set may no  longer be the current versions.
  742.  
  743.          For a copy of the latest monthly software library newsletter
  744.          and a list of the 1,000+ disks in the library, call or write
  745.  
  746.                         The Public (Software) Library
  747.                               P.O.Box 35705 - F
  748.                            Houston, TX 77235-5705
  749.                       (713) 721-6104 or (713) 721-5205
  750.  
  751.